package com.scedu;

import com.scedu.dao.StudentDao;
import com.scedu.entity.Student;
import com.scedu.utils.MybatisUtil;
import org.apache.ibatis.session.SqlSession;

public class AppAdd {
    public static void main(String[] args) {

        SqlSession sqlSession = MybatisUtil.getSqlSession();
        Student student=new Student();
        student.setId(1006);
        student.setName("张三6");
        student.setEmail("zss6@qq.com");
        student.setAge(16);
        StudentDao mapper = sqlSession.getMapper(StudentDao.class);
        int i = mapper.insertStudent(student);
        sqlSession.commit();
        System.out.println(i);
    }
}
